package services;

import domain.entities.InvestigadorProtocoloCentro;
import domain.entities.TherapeuticArea;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Guillermo
 * Date: 23/08/12
 * Time: 17:15
 * To change this template use File | Settings | File Templates.
 */
public class CriteriaTherapeuticArea extends Criteria{

    private TherapeuticArea therapeuticArea;

    public CriteriaTherapeuticArea(TherapeuticArea therapeuticArea) {
        this.therapeuticArea = therapeuticArea;
    }

    @Override
    public boolean isIn(Object element){
        boolean isIn = true;

        TherapeuticArea other = (TherapeuticArea)element;

        isIn &= isSubstring(therapeuticArea.getName(), other.getName());
        return isIn;
    }
}
